//
//  CAReturnGoodsDetailSpeakView.m
//  LNH
//
//  Created by twentylx on 2018/2/26.
//  Copyright © 2018年 twentylx. All rights reserved.
//

#import "CAReturnGoodsDetailSpeakView.h"

@implementation CAReturnGoodsDetailSpeakView

/**
 为视图绑定 viewModel
 
 @param viewModel 要绑定的ViewModel
 @param params 额外参数
 */
- (void)bindViewModel:(id <LMViewProtocol>)viewModel withParams:(NSDictionary *)params {
    
}

/**
 初始化额外数据
 */
- (void)lm_initializeForView {
}

/**
 初始化视图
 */
- (void)lm_createViewForView {
    [self setNeedsUpdateConstraints];
    
    [self addSubview:self.topLineView];
    [self addSubview:self.returnSpeakLabel];
    [self addSubview:self.oneLabel];
    [self addSubview:self.twoLabel];
    [self addSubview:self.threeLabel];
    [self addSubview:self.fourLabel];
    [self addSubview:self.tipsLabel];
}

#pragma mark layout
- (void)updateConstraints {
    [super updateConstraints];
    
    [_topLineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.and.right.equalTo(self);
        make.top.equalTo(self);
        make.height.mas_equalTo(ONE_PIXEL);
    }];
    
    [self.returnSpeakLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.top.equalTo(self).offset(10);
    }];
    
    [self.oneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.top.equalTo(self.returnSpeakLabel.mas_bottom).offset(10);
    }];
    
    [self.twoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.top.equalTo(self.oneLabel.mas_bottom).offset(10);
    }];
    
    [self.threeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.top.equalTo(self.twoLabel.mas_bottom).offset(10);
    }];
    
    [self.fourLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.top.equalTo(self.threeLabel.mas_bottom).offset(10);
    }];
    
    [self.tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.top.equalTo(self.fourLabel.mas_bottom).offset(10);
    }];
}

#pragma mark get & set
- (UIView *)topLineView {
    if (!_topLineView) {
        _topLineView = [UIView new];
        _topLineView.backgroundColor = RGBCOLOR(186, 186, 186);
    }
    return _topLineView;
}

- (UILabel *)returnSpeakLabel {
    if (!_returnSpeakLabel) {
        _returnSpeakLabel = [UILabel new];
        _returnSpeakLabel.text = @"退货说明：退换货包裹内请附纸条写上您的";
        _returnSpeakLabel.font = [UIFont systemFontOfSize:14];
    }
    return _returnSpeakLabel;
}

- (UILabel *)oneLabel {
    if (!_oneLabel) {
        _oneLabel = [UILabel new];
        _oneLabel.text = @"1.订单编号";
        _oneLabel.font = [UIFont systemFontOfSize:14];
    }
    return _oneLabel;
}

- (UILabel *)twoLabel {
    if (!_twoLabel) {
        _twoLabel = [UILabel new];
        _twoLabel.text = @"2.订单收件人电话";
        _twoLabel.font = [UIFont systemFontOfSize:14];
    }
    return _twoLabel;
}

- (UILabel *)threeLabel {
    if (!_threeLabel) {
        _threeLabel = [UILabel new];
        _threeLabel.text = @"3.退换货理由";
        _threeLabel.font = [UIFont systemFontOfSize:14];
    }
    return _threeLabel;
}

- (UILabel *)fourLabel {
    if (!_fourLabel) {
        _fourLabel = [UILabel new];
        _fourLabel.text = @"4.如换货要写上要换的颜色，尺码。";
        _fourLabel.font = [UIFont systemFontOfSize:14];
    }
    return _fourLabel;
}

- (UILabel *)tipsLabel {
    if (!_tipsLabel) {
        _tipsLabel = [UILabel new];
        _tipsLabel.text = @"注：以上信息需填写完整，否则将不予处理，谢谢！";
        _tipsLabel.textColor = RGBCOLOR(132, 132, 132);
        _tipsLabel.font = [UIFont systemFontOfSize:14];
    }
    return _tipsLabel;
}
@end



